/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { getLeagueList } from '@/services/jdk/shield';
import { formatOptions } from '../../utils';

export const handleSearch = (value: { keyWords: string }) => {
  const { keyWords } = value;
  return getLeagueList({ search: keyWords }).then((res) => {
    const {
      data: { list = [] },
    } = res;
    return formatOptions(list);
  });
};
